package cn.chengdu.controller;


import cn.chengdu.entity.Patientinformation;
import cn.chengdu.service.IPatientinformationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.util.List;

/**
 * <p>
 * 挂号信息表 前端控制器
 * </p>
 *
 * @author jobob
 * @since 2019-11-25
 */
@Controller
@RequestMapping("/patientinformation")
public class PatientinformationController {

    @Autowired
    private IPatientinformationService iPatientinformationService;

    @RequestMapping("/getxinxi")
    @ResponseBody
    public List<Patientinformation> getxinxi(HttpServletRequest request){
        HttpSession session = request.getSession();
        String pphone=(String)session.getAttribute("pphone");


        return iPatientinformationService.getxinxi(pphone);

    }




}
